﻿#ifndef DASHBOARDFORM_H
#define DASHBOARDFORM_H

#include <QWidget>
#include <QtCharts>
QT_CHARTS_USE_NAMESPACE

typedef QPair<QPointF, QString> Data;
typedef QList<Data> DataList;
typedef QList<DataList> DataTable;

namespace Ui {
class DashboardForm;
}

class DashboardForm : public QWidget
{
    Q_OBJECT

public:
    explicit DashboardForm(QWidget *parent = nullptr);
    ~DashboardForm();

private:
    Ui::DashboardForm *ui;

    DataTable generateRandomData(int listCount, int valueMax, int valueCount) const;
    QChart *createAreaChart() const;
    QChart *createBarChart(int valueCount) const;
    QChart *createPieChart() const;
    QChart *createLineChart() const;
    QChart *createSplineChart() const;
    QChart *createScatterChart() const;

    int m_listCount;
    int m_valueMax;
    int m_valueCount;
    DataTable m_dataTable;
};

#endif // DASHBOARDFORM_H
